package com.tgy.api;

import cn.dev33.satoken.SaManager;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.data.mongodb.repository.config.EnableMongoRepositories;


// 取消自动装配MongoDB的配置
// @SpringBootApplication(exclude = {MongoAutoConfiguration.class,
//         MongoDataAutoConfiguration.class})
@SpringBootApplication
//加上这个注解就会扫描com.imooc之下所有@service、@Bean之类的注解
// @ComponentScan(basePackages = {"com.tgy","org.n3r.idworker"})
@ComponentScan(basePackages = {"com.tgy","org.n3r.idworker"})
// 扫描mapper文件
@MapperScan("com.tgy.**.mapper")
// 扫描MongoRepository
@EnableMongoRepositories( basePackages = "com.tgy")
//开启eureka
// @EnableEurekaClient
public class BlogApplication {

    public static void main(String[] args) {
        SpringApplication.run(BlogApplication.class,args);
        System.out.println("启动成功：Sa-Token配置如下：" + SaManager.getConfig());
    }

}
